package org.chnxi.study.springcloud.alibaba.order.controller;

import org.chnxi.study.springcloud.alibaba.order.rest.storage.IStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Value("[${spring.application.name}-${server.port}]:")
    public String appName;

    @Autowired
    private IStorageService storageService;

    @GetMapping("/order/test")
    public String test(){
        String result = storageService.test();
        return appName+"OK -> "+result;
    }

}
